/*

*** This do file creates the replication results for 

Good Policy can Lower Violent Crime: Evidence From Fixed Effects Estimation in a Cross-National Panel of Homicide Rates, 1980-97, Journal of Peace Research 40 (6), 2003, pp. 619-640

Eric Neumayer (LSE)																			

Please report any errors to e.neumayer@lse.ac.uk

*/

use "JPR (homicide).dta", replace

tsset country year
* Table 1
quietly xi: areg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc i.period, absorb(country) robust
su homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom polity deathp humanrightsviol econdisc giniwider socialwelfareexp if e(sample)

* Table 2
preserve
xtdata homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc, fe
corr homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc
restore

* Table 3
preserve
* Drop countries with only one observation
capture drop if name=="Cuba" | name=="Iceland" | name=="Lebanon" | name=="South Africa" | name=="Togo" | name=="Vietnam" | name=="Yugoslavia, FR (Serbia/Montenegro)"
set matsize 800
xi: areg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc i.period, absorb(country) robust
xi: areg homrate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc i.period, absorb(country) robust
xi: xtabond homiciderate householdsize popdensity urban femlabourpart i.period, pre(lngdp econgrowth male1564 freedom freedomsq deathp humanrightsviol econdisc) robust
xi: areg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc giniwider i.period, absorb(country) robust
xi: areg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc socialwelfareexp i.period, absorb(country) robust
restore

* Table 4
preserve
set matsize 800
* Drop countries with only one observation
capture drop if name=="Cuba" | name=="Iceland" | name=="Lebanon" | name=="South Africa" | name=="Togo" | name=="Vietnam" | name=="Yugoslavia, FR (Serbia/Montenegro)"

xi: areg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 polity politysq deathp humanrightsviol econdisc i.period, absorb(country) robust
outreg using c:\homicide, replace
xi: areg homrate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 polity politysq deathp humanrightsviol econdisc i.period, absorb(country) robust
restore

xi: xtreg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc giniwider i.period, re
xthaus
xi: xtreg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc socialwelfareexp i.period, re
xthaus
xi: xtreg homiciderate lngdp econgrowth urban femlabourpart householdsize popdensity male1564 freedom freedomsq deathp humanrightsviol econdisc giniwider i.period, be

